package com.bbh.plugin.single.privilege.core.service;


import com.bbh.plugin.single.privilege.core.entity.OperateLog;
import com.bbh.plugin.single.privilege.core.repository.OperateLogMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import com.bbh.common.domain.Page;


import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;
import com.bbh.common.base.service.BaseService;
/**
 * Created by roman_000 on 2015/7/15.
 */
@Service
@Transactional
public class OperateLogService extends BaseService<OperateLog, String> {
   @Autowired
   private  OperateLogMapper operateLogMapper;

    public Page<OperateLog> selectPage(Map<String, Object> params, Page pageable) {
        PageHelper.startPage(pageable.getPageNum() + 1, pageable.getPageSize());
        List<OperateLog> userVoList = operateLogMapper.findPage(params);
        PageInfo<OperateLog> pageInfo = new PageInfo<>(userVoList);
        return pageConverter(pageInfo);
    }
}
